package com.team5101.product.service.config;

import com.github.pagehelper.PageHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

@Configuration
public class PageConfig {

    @Bean
    public PageHelper getPageHelper(){

        PageHelper pageHelper = new PageHelper();
        Properties p = new Properties();
        p.setProperty("dialect","mysql");
        p.setProperty("reasonable","true");
        //可以加入多个键值对，实现想要的效果，这些键值对请参考官网
        pageHelper.setProperties(p);

        return pageHelper;
    }

}
